/* =================================================================== */
/* === DESIGN PREMIUM - ÁREA DO TÉCNICO (v5.0) ===================== */
/* =================================================================== */

/* --- Painel de KPIs (Glassmorphism) --- */
#tecnico-kpi-panel .row {
    margin-left: -5px;
    margin-right: -5px;
}
#tecnico-kpi-panel .col-4, 
#tecnico-kpi-panel .col-12 {
    padding-left: 5px;
    padding-right: 5px;
}

.tech-stat-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.5);
    transition: transform 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.tech-stat-card:active { transform: scale(0.98); }

.tech-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 8px;
}
.tech-stat-icon.blue { background: rgba(52, 152, 219, 0.1); color: #3498DB; }
.tech-stat-icon.orange { background: rgba(243, 156, 18, 0.1); color: #f39c12; }
.tech-stat-icon.red { background: rgba(231, 76, 60, 0.1); color: #e74c3c; }
.tech-stat-icon.green { background: rgba(46, 204, 113, 0.1); color: #2ecc71; }

.tech-stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #2C3E50;
    line-height: 1;
    margin-bottom: 2px;
}
.tech-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7f8c8d;
    font-weight: 600;
}

/* --- Novos Cards de Equipamento (Lista) --- */
.tech-item-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.tech-item-card:active { transform: scale(0.99); }

/* Barra lateral colorida de status */
.tech-item-status-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}

.tech-item-body {
    padding: 15px 15px 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tech-item-info h6 {
    font-weight: 700;
    margin: 0;
    font-size: 1rem;
    color: #2C3E50;
}
.tech-item-info .serial {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #7f8c8d;
    letter-spacing: 0.5px;
    display: block;
    margin-top: 2px;
}
.tech-item-info .meta {
    font-size: 0.75rem;
    color: #95a5a6;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Botão de Ação Rápida (Canto direito) */
.tech-item-action {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.btn-tech-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f7f9;
    color: #2C3E50;
    transition: all 0.2s;
}
.btn-tech-icon:active { background: #e2e6ea; }
.btn-tech-icon.primary { background: rgba(52, 152, 219, 0.1); color: #3498DB; }

/* Rodapé do Card (Ações Pendentes) */
.tech-item-footer {
    background: #fcfcfc;
    border-top: 1px solid #f1f1f1;
    padding: 10px 15px;
}
.btn-tech-block {
    width: 100%;
    border-radius: 10px;
    padding: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-tech-block.success { background: #d1fae5; color: #065f46; }
.btn-tech-block.warning { background: #fef3c7; color: #92400e; }
.btn-tech-block.danger { background: #fee2e2; color: #991b1b; }

/* =================================================================== */
/* === DESIGN APP TÉCNICO (HOME GRID) - v6.0 ======================= */
/* =================================================================== */

/* Container da Grade */
.tech-home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 15px;
}

/* Cartão de Ação (O Quadrado) */
.tech-action-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.1s, background-color 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    text-decoration: none !important;
}

.tech-action-card:active {
    transform: scale(0.96);
    background-color: #f8f9fa;
}

/* Ícone dentro do cartão */
.tech-action-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 12px;
    transition: transform 0.2s;
}

/* Cores dos Ícones */
.icon-blue   { background: rgba(52, 152, 219, 0.15); color: #3498DB; }
.icon-green  { background: rgba(46, 204, 113, 0.15); color: #27ae60; }
.icon-purple { background: rgba(155, 89, 182, 0.15); color: #8e44ad; }
.icon-orange { background: rgba(243, 156, 18, 0.15); color: #e67e22; }
.icon-red    { background: rgba(231, 76, 60, 0.15); color: #c0392b; }
.icon-teal   { background: rgba(26, 188, 156, 0.15); color: #16a085; }

/* Texto do cartão */
.tech-action-title {
    font-weight: 700;
    color: #2C3E50;
    font-size: 0.95rem;
    margin-bottom: 2px;
    line-height: 1.2;
}

.tech-action-subtitle {
    font-size: 0.75rem;
    color: #95a5a6;
}

/* Cabeçalho de Boas-vindas Compacto */
.tech-welcome-header {
    padding: 20px 20px 0 20px;
    margin-bottom: 10px;
}
.tech-welcome-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.tech-welcome-date {
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
}

/* Badges de Notificação no Grid */
.tech-card-badge {
    background-color: #e74c3c;
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    position: absolute;
    top: 10px;
    right: 10px;
    font-weight: bold;
}
.tech-action-card { position: relative; }

/* =================================================================== */
/* === DESIGN PREMIUM: PERFIL, CHAT E MODAIS (CORRIGIDO) =========== */
/* =================================================================== */

/* 1. REMOVE CABEÇALHO ANTIGO */
#tecnico-header { display: none !important; }

/* 2. AJUSTE GERAL DE LAYOUT */
body.role-tecnico .content-section.active {
    padding-top: 30px !important;
    padding-bottom: 90px !important;
    padding-left: 15px;
    padding-right: 15px;
}

/* 3. TÍTULOS DAS PÁGINAS INTERNAS */
.page-title {
    color: white;
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.page-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

/* 4. CARTÃO "GLASS" GENÉRICO (Base para Perfil e Metas) */
.tech-glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.5);
    margin-bottom: 20px;
}

/* 5. TELA DE PERFIL (Centralizada) */
#perfil .profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 20px;
    width: 100%;
}
#perfil .profile-img-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
}
#perfil img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
#perfil .btn-camera {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--secondary-color);
    color: white;
    border: 3px solid white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
#perfil h4 {
    margin-top: 10px;
    font-size: 1.5rem;
    color: #2C3E50;
    font-weight: 700;
}
#perfil p {
    margin-bottom: 0;
    font-size: 1rem;
    color: #7f8c8d;
}

/* 6. TELA DE META/DESEMPENHO */
#desempenho .list-group-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 15px 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#desempenho .list-group-item:last-child { border-bottom: none; }
#desempenho i { font-size: 1.2rem; width: 30px; text-align: center; margin-right: 10px; }
#desempenho .badge { font-size: 0.9rem; padding: 6px 12px; border-radius: 8px; }

/* 7. MAPA DE REDE */
#mapa-rede #mapContainer {
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 4px solid white;
    height: 65vh !important;
}

/* 8. CHAT TÉCNICO - LISTA DE CONVERSAS (CORRIGIDO) */
#tech-chat-list-window .card {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}
#tech-chat-list-window .card-header {
    background: transparent !important;
    color: #fff !important; /* Título sempre Branco aqui */
    border-bottom: none;
    padding-top: 10px;
    padding-bottom: 20px;
}
#tech-chat-list-window h5 {
    font-weight: 800;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* Item da lista de chat (Cartão flutuante) */
.tech-chat-list-item {
    background: white;
    margin-bottom: 10px;
    border-radius: 16px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    border: none !important;
    padding: 15px !important;
    display: flex;
    align-items: center;
}

/* =================================================================== */
/* 9. CHAT TÉCNICO - JANELA DE MENSAGENS (CORRIGIDO E ALINHADO) ====== */
/* =================================================================== */

#tech-chat-message-window .card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: none;
    height: calc(100vh - 140px) !important;
    display: flex;       /* Garante que o card seja flex */
    flex-direction: column;
}

#tech-chat-message-window .card-header {
    background: white !important;
    color: #2C3E50 !important;
    border-bottom: 1px solid #f0f0f0;
    padding: 15px;
    flex-shrink: 0; /* Impede que o cabeçalho encolha */
}

/* --- O CONTAINER DAS MENSAGENS --- */
.tech-chat-message-body {
    flex-grow: 1;
    background-color: #f4f7f9;
    padding: 15px;
    overflow-y: auto;
    
    /* A MÁGICA DO ALINHAMENTO: */
    display: flex;
    flex-direction: column-reverse; /* Mensagens novas embaixo */
    gap: 10px; /* Espaço entre as mensagens */
}

/* --- AS BOLHAS (BALÕES) --- */
.chat-message-bubble {
    border-radius: 18px !important;
    padding: 10px 16px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-size: 0.95rem;
    position: relative;
    max-width: 85%; /* Limita a largura para não ocupar a tela toda */
    word-wrap: break-word;
}

/* Minhas Mensagens (Enviadas pelo Técnico) -> DIREITA */
.chat-message-bubble.sent {
    background-color: #3498DB !important;
    color: white !important;
    border-bottom-right-radius: 2px !important; /* Pontinha quadrada */
    
    /* JOGA PARA A DIREITA */
    align-self: flex-end !important; 
    margin-left: auto; /* Garante empurrão extra */
}

/* Mensagens Deles (Recebidas do Operador) -> ESQUERDA */
.chat-message-bubble.received {
    background-color: #ffffff !important;
    color: #333 !important;
    border-bottom-left-radius: 2px !important; /* Pontinha quadrada */
    border: 1px solid #e0e0e0;
    
    /* JOGA PARA A ESQUERDA */
    align-self: flex-start !important;
    margin-right: auto; /* Garante empurrão extra */
}

/* Ajuste de data/hora dentro da bolha */
.chat-message-bubble .timestamp {
    font-size: 0.65rem;
    display: block;
    text-align: right;
    margin-top: 4px;
    opacity: 0.8;
}

/* Rodapé (Input) */
#tech-chat-message-window .card-footer {
    background: white;
    padding: 10px;
    border-top: 1px solid #f1f1f1;
    flex-shrink: 0;
}

/* 10. MODAIS (ESTILO CLEAN) */
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}
.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 20px 25px;
    /* Mantém a cor de fundo original definida no HTML (bg-primary, etc) */
}
/* Títulos dos modais devem ser brancos se o fundo for colorido */
.modal-header.bg-primary .modal-title,
.modal-header.bg-success .modal-title,
.modal-header.bg-danger .modal-title,
.modal-header.bg-info .modal-title,
.modal-header.bg-warning .modal-title,
.modal-header.bg-dark .modal-title {
    color: white !important;
    font-weight: 700;
}
.modal-title {
    font-weight: 700;
    letter-spacing: -0.5px;
}
.modal-body {
    padding: 25px;
    background-color: #fcfcfc;
}
.modal-footer {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 15px 25px;
    background-color: white;
}
.modal-body .form-control, 
.modal-body .form-select {
    border-radius: 12px;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    background-color: white;
    font-size: 1rem;
}
.modal-body label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
}

/* =================================================================== */
/* === MODO NOTURNO (DARK MODE) - CORREÇÕES FINAIS TOTAIS ========== */
/* =================================================================== */

/* 1. HOME E CARDS */
body.role-tecnico.dark-mode .tech-stat-card,
body.role-tecnico.dark-mode .tech-action-card {
    background: rgba(26, 42, 60, 0.8);
    border-color: rgba(255,255,255,0.1);
}
body.role-tecnico.dark-mode .tech-action-title,
body.role-tecnico.dark-mode .tech-stat-value { color: #fff; }
body.role-tecnico.dark-mode .tech-action-subtitle,
body.role-tecnico.dark-mode .tech-stat-label { color: #aaa; }

/* 2. LISTA DE EQUIPAMENTOS */
body.role-tecnico.dark-mode .tech-item-card {
    background: rgba(26, 42, 60, 0.8);
}
body.role-tecnico.dark-mode .tech-item-info h6 { color: #fff; }
body.role-tecnico.dark-mode .tech-item-footer {
    background: rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.05);
}
body.role-tecnico.dark-mode .btn-tech-icon {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* 3. PERFIL (GLASS E ÍCONES) */
body.role-tecnico.dark-mode .tech-glass-card {
    background: rgba(26, 42, 60, 0.8);
    color: #fff;
    border-color: rgba(255,255,255,0.1);
}
body.role-tecnico.dark-mode #perfil h4 { color: #fff !important; }
body.role-tecnico.dark-mode #perfil p { color: #aaa !important; }

/* Correção crucial para os itens da lista do perfil */
body.role-tecnico.dark-mode #perfil .list-group-item {
    background-color: transparent !important;
    color: white !important;
    border-color: rgba(255,255,255,0.1);
}
body.role-tecnico.dark-mode #perfil .list-group-item i {
    color: white !important; /* Ícones brancos */
}
/* Fundo dos ícones redondos */
body.role-tecnico.dark-mode #perfil .bg-dark,
body.role-tecnico.dark-mode #perfil .bg-info {
    background-color: rgba(255,255,255,0.15) !important; 
}

/* 4. CHAT (LISTA E MENSAGEM) */
body.role-tecnico.dark-mode .tech-chat-list-item {
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.05) !important;
}
body.role-tecnico.dark-mode .chat-list-item-name { color: white !important; }
body.role-tecnico.dark-mode .chat-list-item-lastmsg { color: #ccc !important; }

body.role-tecnico.dark-mode #tech-chat-message-window .card-header {
    background: #1a2a3c !important;
    color: white !important;
    border-bottom-color: rgba(255,255,255,0.1);
}
body.role-tecnico.dark-mode .chat-message-bubble.received {
    background-color: #2c3e50 !important;
    color: white !important;
}

/* 5. MODAIS NO MODO ESCURO */
body.role-tecnico.dark-mode .modal-content {
    background-color: #1A2A3C;
    border: 1px solid rgba(255,255,255,0.1);
    color: #e0e0e0;
}
body.role-tecnico.dark-mode .modal-header {
    border-bottom-color: rgba(255,255,255,0.1);
    /* Mantém a cor de fundo definida no HTML */
}
/* Garante título branco no modo escuro */
body.role-tecnico.dark-mode .modal-title,
body.role-tecnico.dark-mode .modal-header .btn-close {
    color: white !important;
}
body.role-tecnico.dark-mode .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

body.role-tecnico.dark-mode .modal-body {
    background-color: #152232;
    color: #e0e0e0;
}
body.role-tecnico.dark-mode .modal-footer {
    background-color: #1A2A3C;
    border-top-color: rgba(255,255,255,0.1);
}
body.role-tecnico.dark-mode .modal-body .form-control,
body.role-tecnico.dark-mode .modal-body .form-select {
    background-color: #0f1a25;
    border-color: #2c3e50;
    color: white;
}
body.role-tecnico.dark-mode .modal-body label {
    color: #bbb;
}

/* =================================================================== */
/* === DESIGN PREMIUM - ÁREA DO TÉCNICO (VERSÃO FINAL v4.0) ======== */
/* =================================================================== */

/* --- 1. LAYOUT GERAL --- */
#tecnico-header { display: none !important; }

body.role-tecnico .content-section.active {
    padding-top: 30px !important;
    padding-bottom: 90px !important;
    padding-left: 15px;
    padding-right: 15px;
}

/* Títulos das Páginas */
.page-title {
    color: white;
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.page-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

/* --- 2. HOME GRID (BOTÕES QUADRADOS) --- */
.tech-home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 15px;
}
.tech-action-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.1s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    position: relative;
    text-decoration: none !important;
}
.tech-action-card:active { transform: scale(0.96); background-color: #f8f9fa; }

.tech-action-icon {
    width: 60px; height: 60px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 12px;
}
/* Cores dos Ícones */
.icon-blue { background: rgba(52, 152, 219, 0.15); color: #3498DB; }
.icon-green { background: rgba(46, 204, 113, 0.15); color: #27ae60; }
.icon-purple { background: rgba(155, 89, 182, 0.15); color: #8e44ad; }
.icon-orange { background: rgba(243, 156, 18, 0.15); color: #e67e22; }
.icon-teal { background: rgba(26, 188, 156, 0.15); color: #16a085; }

.tech-action-title { font-weight: 700; color: #2C3E50; font-size: 0.95rem; margin-bottom: 2px; line-height: 1.2; }
.tech-action-subtitle { font-size: 0.75rem; color: #95a5a6; }
.tech-card-badge { background-color: #e74c3c; color: white; font-size: 0.75rem; padding: 2px 8px; border-radius: 10px; position: absolute; top: 10px; right: 10px; font-weight: bold; }

/* --- 3. PAINEL DE KPIs (MEUS ITENS) --- */
#tecnico-kpi-panel .row { margin-left: -5px; margin-right: -5px; }
#tecnico-kpi-panel .col-4, #tecnico-kpi-panel .col-12 { padding-left: 5px; padding-right: 5px; }

.tech-stat-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.5);
    height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.tech-stat-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; margin-bottom: 8px; }
.tech-stat-value { font-size: 1.4rem; font-weight: 800; color: #2C3E50; line-height: 1; margin-bottom: 2px; }
.tech-stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; color: #7f8c8d; font-weight: 600; }

/* --- 4. LISTA DE EQUIPAMENTOS (CARDS) --- */
.tech-item-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
}
.tech-item-status-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.tech-item-body { padding: 15px 15px 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.tech-item-info h6 { font-weight: 700; margin: 0; font-size: 1rem; color: #2C3E50; }
.tech-item-info .serial { font-family: 'Courier New', monospace; font-size: 0.85rem; color: #7f8c8d; display: block; margin-top: 2px; }
.tech-item-info .meta { font-size: 0.75rem; color: #95a5a6; margin-top: 4px; display: flex; align-items: center; gap: 10px; }
.btn-tech-icon { width: 38px; height: 38px; border-radius: 12px; border: none; display: flex; align-items: center; justify-content: center; background: #f4f7f9; color: #2C3E50; }
.btn-tech-icon.primary { background: rgba(52, 152, 219, 0.1); color: #3498DB; }
.tech-item-footer { background: #fcfcfc; border-top: 1px solid #f1f1f1; padding: 10px 15px; }
.btn-tech-block { width: 100%; border-radius: 10px; padding: 8px; font-size: 0.9rem; font-weight: 600; border: none; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-tech-block.success { background: #d1fae5; color: #065f46; }
.btn-tech-block.warning { background: #fef3c7; color: #92400e; }
.btn-tech-block.danger { background: #fee2e2; color: #991b1b; }

/* --- 5. TELA DE PERFIL (CORREÇÃO DOS ÍCONES E ALINHAMENTO) --- */
.tech-glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.5);
    margin-bottom: 20px;
}
#perfil .profile-header {
    display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 20px; width: 100%;
}
#perfil .profile-img-container { position: relative; width: 120px; height: 120px; margin: 0 auto 15px; }
#perfil img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid white; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
#perfil .btn-camera { position: absolute; bottom: 5px; right: 5px; background: var(--secondary-color); color: white; border: 3px solid white; border-radius: 50%; width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
#perfil h4 { margin-top: 10px; font-size: 1.5rem; color: #2C3E50; font-weight: 700; }
#perfil p { margin-bottom: 0; font-size: 1rem; color: #7f8c8d; }

/* ESTILO DOS ITENS DO MENU DE PERFIL (CORREÇÃO VISUAL) */
#perfil .list-group-item {
    border: none;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f8f9fa; /* Fundo cinza claro */
    border-radius: 12px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.1s;
}
#perfil .list-group-item:active { transform: scale(0.98); }
/* Ícones redondos coloridos */
#perfil .bg-dark { background-color: #34495e !important; }
#perfil .bg-info { background-color: #3498db !important; color: white !important; }

/* --- 6. TELA DE CHAT (CORREÇÃO DE TRANSPARÊNCIA E TÍTULO) --- */
/* Tira o fundo do card container para ver o fundo azul do app */
#tech-chat-list-window .card { background: transparent !important; border: none !important; box-shadow: none !important; }
/* Título BRANCO e GRANDE */
#tech-chat-list-window .card-header { background: transparent !important; color: #ffffff !important; border-bottom: none; padding-top: 10px; padding-bottom: 20px; }
#tech-chat-list-window h5 { font-weight: 800; font-size: 1.8rem; text-shadow: 0 2px 4px rgba(0,0,0,0.2); }

/* Itens da lista de conversa (Brancos e Sólidos) */
.tech-chat-list-item {
    background: #ffffff !important; /* Fundo branco SÓLIDO */
    margin-bottom: 10px;
    border-radius: 16px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: none !important;
    padding: 15px !important;
    display: flex; align-items: center;
    opacity: 1 !important; /* Garante opacidade */
}

/* Janela de Mensagem */
#tech-chat-message-window .card { border-radius: 16px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.1); border: none; height: calc(100vh - 140px) !important; }
#tech-chat-message-window .card-header { background: white !important; color: #2C3E50 !important; border-bottom: 1px solid #f0f0f0; padding: 15px; }
.chat-message-bubble { border-radius: 18px !important; padding: 12px 18px !important; box-shadow: 0 1px 2px rgba(0,0,0,0.05); font-size: 0.95rem; position: relative; }
.chat-message-bubble.sent { background-color: #3498DB !important; color: white !important; border-bottom-right-radius: 4px !important; }
.chat-message-bubble.received { background-color: #f0f2f5 !important; color: #050505 !important; border-bottom-left-radius: 4px !important; }

/* --- 7. MODAIS (ESTILO CLEAN E CORREÇÃO DARK MODE) --- */
.modal-content { border: none; border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); overflow: hidden; }
.modal-header { border-bottom: 1px solid rgba(0,0,0,0.05); padding: 20px 25px; }
/* Garante título branco em headers coloridos */
.modal-header.bg-primary .modal-title, .modal-header.bg-success .modal-title, .modal-header.bg-danger .modal-title, .modal-header.bg-warning .modal-title { color: white !important; font-weight: 700; }
.modal-body { padding: 25px; background-color: #fcfcfc; }
.modal-footer { border-top: 1px solid rgba(0,0,0,0.05); padding: 15px 25px; background-color: white; }
.modal-body .form-control, .modal-body .form-select { border-radius: 12px; padding: 12px 15px; border: 1px solid #e0e0e0; background-color: white; font-size: 1rem; }
.modal-body label { font-weight: 600; font-size: 0.85rem; color: #555; margin-bottom: 6px; text-transform: uppercase; }

/* --- 8. MODO NOTURNO (CORREÇÕES FINAIS) --- */
/* Cards Gerais */
body.role-tecnico.dark-mode .tech-stat-card,
body.role-tecnico.dark-mode .tech-action-card,
body.role-tecnico.dark-mode .tech-glass-card {
    background: rgba(30, 41, 59, 0.9) !important; /* Azul muito escuro sólido */
    border-color: rgba(255,255,255,0.1);
}
/* Textos Gerais */
body.role-tecnico.dark-mode .tech-action-title,
body.role-tecnico.dark-mode .tech-stat-value,
body.role-tecnico.dark-mode h4,
body.role-tecnico.dark-mode h5,
body.role-tecnico.dark-mode h6 { color: #fff !important; }
body.role-tecnico.dark-mode p, body.role-tecnico.dark-mode small, body.role-tecnico.dark-mode .text-muted { color: #aaa !important; }

/* Correção Lista de Equipamentos */
body.role-tecnico.dark-mode .tech-item-card { background: rgba(30, 41, 59, 0.95); }
body.role-tecnico.dark-mode .tech-item-footer { background: rgba(0,0,0,0.3); border-color: rgba(255,255,255,0.05); }
body.role-tecnico.dark-mode .btn-tech-icon { background: rgba(255,255,255,0.1); color: #fff; }

/* Correção Perfil */
body.role-tecnico.dark-mode #perfil .list-group-item {
    background-color: rgba(255,255,255,0.05) !important; /* Fundo translúcido no dark mode */
    color: white !important;
}

/* Correção Chat */
body.role-tecnico.dark-mode .tech-chat-list-item {
    background: rgba(30, 41, 59, 0.9) !important; /* Fundo escuro sólido para o item */
    border: 1px solid rgba(255,255,255,0.1) !important;
}
body.role-tecnico.dark-mode .chat-list-item-name { color: white !important; }
body.role-tecnico.dark-mode #tech-chat-message-window .card-header { background: #1e293b !important; color: white !important; border-bottom-color: rgba(255,255,255,0.1); }
body.role-tecnico.dark-mode .chat-message-bubble.received { background-color: #334155 !important; color: white !important; }

/* Correção Modais Dark Mode (Inputs e Fundo) */
body.role-tecnico.dark-mode .modal-content { background-color: #1e293b; color: #e0e0e0; }
body.role-tecnico.dark-mode .modal-header { border-bottom-color: rgba(255,255,255,0.1); }
body.role-tecnico.dark-mode .modal-body { background-color: #0f172a; }
body.role-tecnico.dark-mode .modal-footer { background-color: #1e293b; border-top-color: rgba(255,255,255,0.1); }
/* Inputs Escuros */
body.role-tecnico.dark-mode .modal-body .form-control,
body.role-tecnico.dark-mode .modal-body .form-select {
    background-color: #0f172a; 
    border-color: #334155; 
    color: white;
}
body.role-tecnico.dark-mode .modal-body label { color: #94a3b8; }

/* --- 1. LAYOUT BASE E RESET PARA TÉCNICO --- */
#tecnico-header { display: none !important; } 

body.role-tecnico {
    background: linear-gradient(-45deg, #1a2a6c, #2C3E50, #2980b9, #3498DB);
    background-size: 400% 400%;
    animation: moveGradient 15s ease infinite;
    padding-bottom: 80px; /* Espaço Menu Inferior */
    padding-top: 0 !important; /* Sobrescreve o padding do admin */
    min-height: 100vh;
}
@keyframes moveGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* Esconde menus de admin */
body.role-tecnico .navbar { display: none !important; }

/* Header Técnico */
#tecnico-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1020;
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 20px; background: linear-gradient(135deg, #1a2a6c, #2C3E50); color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transform: translateY(-100%); visibility: hidden; transition: transform 0.3s;
}
body.role-tecnico #tecnico-header { transform: translateY(0); visibility: visible; }

/* Menu Inferior (O que estava sumido) */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; height: 65px;
    background-color: #ffffff; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: none; justify-content: space-around; align-items: center;
    z-index: 1030; border-top: 1px solid #e0e0e0;
}
body.role-tecnico .bottom-nav { display: flex; }
.bottom-nav .nav__link { display: flex; flex-direction: column; align-items: center; color: #9e9e9e; text-decoration: none; flex-grow: 1; }
.bottom-nav .nav__link.active { color: #2C3E50; transform: translateY(-2px); }
.bottom-nav .nav__icon { font-size: 22px; }

/* Cards de Equipamento (Técnico) */
.equipment-card-v2 {
    background-color: #fff; margin-bottom: 15px; border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); overflow: hidden;
}
.equipment-card-v2 .card-main-info { display: flex; align-items: center; padding: 15px; justify-content: space-between; }
.equipment-card-v2 .icon-container { font-size: 1.8rem; color: #6c757d; margin-right: 15px; }
.equipment-card-v2 .card-status-footer { padding: 0; }
.status-badge { padding: 10px; text-align: center; font-weight: 600; background: #f8f9fa; border-top: 1px solid #eee; }
.provisionable-card { border-left: 5px solid #28a745; }

/* Chat Tela Cheia (Técnico) */
#tech-chat-list-window { padding-top: 0; padding-bottom: 75px; height: 100%; overflow-y: auto; }
body.role-tecnico #tech-chat-message-window[style*="display: block"] {
    display: flex !important; flex-direction: column;
    height: calc(100vh - 60px - 65px); padding: 0 !important;
}
.tech-chat-list-item { background: #fff; padding: 15px; margin-bottom: 10px; border-radius: 16px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); display: flex; align-items: center; }

/* Indicador Online */
.online-operators-indicator { display: flex; align-items: center; font-size: 0.8rem; color: rgba(255, 255, 255, 0.8); }

/* =================================================================== */
/* === NOVOS ESTILOS (v5.1) - Home Compacta, Carrossel e Materiais === */
/* =================================================================== */

/* --- 1. Grid Compacto da Home (3 colunas) --- */
.tech-home-grid-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 por linha */
    gap: 12px;
    padding: 15px;
}

.tech-action-card-compact {
    background: white;
    border-radius: 16px;
    padding: 15px 5px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    transition: transform 0.1s, background-color 0.1s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 105px;
    cursor: pointer;
    position: relative; /* Para badges */
}

.tech-action-card-compact:active {
    transform: scale(0.96);
    background-color: #f8f9fa;
}

.tech-action-icon-compact {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tech-action-title-compact {
    font-size: 0.75rem;
    font-weight: 700;
    color: #34495e;
    line-height: 1.2;
    white-space: nowrap;     /* Evita quebra */
    overflow: hidden;        /* Esconde excesso */
    text-overflow: ellipsis; /* Adiciona ... */
    max-width: 100%;
}

/* Ajuste para telas muito pequenas (iPhone SE / Galaxy antigo) */
@media (max-width: 360px) {
    .tech-home-grid-compact {
        grid-template-columns: repeat(2, 1fr); /* Volta para 2 colunas se for muito estreito */
    }
}

/* --- 2. Carrossel de Agendamentos (Frota) --- */
.carousel-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 15px; /* Espaço para scrollbar invisível */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin-top: 15px;
}
/* Esconde a barra de rolagem feia */
.carousel-container::-webkit-scrollbar { display: none; }
.carousel-container { -ms-overflow-style: none; scrollbar-width: none; }

.carousel-card {
    min-width: 88%; /* Mostra quase tudo, com uma pontinha do próximo */
    scroll-snap-align: center;
    flex-shrink: 0;
    position: relative;
    /* O estilo interno (bg-success, etc) já vem das classes Bootstrap */
}

/* Indicador visual de "arraste para o lado" (opcional, mas útil) */
.carousel-container::after {
    content: '';
    min-width: 15px; /* Espaço extra no final */
}

/* --- 3. Cartões de Histórico de Materiais --- */
.material-card {
    border: none;
    border-left: 5px solid #ddd; /* Cor padrão */
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}
.material-card.status-Pendente { border-left-color: #f1c40f; }
.material-card.status-Aprovado { border-left-color: #2ecc71; }
.material-card.status-Recusado { border-left-color: #e74c3c; }

/* Controle de Quantidade no Card */
.qty-control {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 5px;
    margin-top: 8px;
}
.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background: white;
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-btn:active { background: #e9ecef; transform: scale(0.95); }
.qty-display {
    width: 40px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: #2c3e50;
}

/* Barra de Checkout Flutuante */
.checkout-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 15px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    z-index: 1060; /* Acima dos modais */
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Card de Histórico com Token */
.token-card {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}
.token-number {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 5px;
    text-align: center;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 5px 0;
    margin: 10px 0;
}

/* ==========================================================================
   FIX: FONTE MODERNA NOS CARDS DO TÉCNICO (Meus Itens)
   ========================================================================== */

/* Força a fonte padrão em todo o card */
.tech-item-card,
.tech-item-info,
.tech-item-info h6,
.tech-item-info .meta,
.tech-item-footer {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

/* Ajuste específico para o SERIAL (Que era estilo "código") */
.tech-item-info .serial {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    font-weight: 700 !important;       /* Mais negrito para destacar */
    font-size: 0.95rem !important;     /* Um pouco maior */
    color: #2C3E50 !important;         /* Cor escura para leitura fácil */
    letter-spacing: 0.5px !important;  /* Espaçamento leve para não grudar letras */
    margin-top: 4px !important;
}

/* Ajuste do Modelo (Título) */
.tech-item-info h6 {
    font-size: 1rem !important;
    letter-spacing: 0 !important;
    color: #3498DB !important; /* Azul para diferenciar do serial */
}

/* Ajuste dos dados meta (Data, etc) */
.tech-item-info .meta {
    font-size: 0.85rem !important;
    color: #64748b !important;
}

/* =================================================================== */
/* === POLIMENTO FINAL (AJUSTES DE DESIGN TÉCNICO) ================= */
/* =================================================================== */

/* 1. CORREÇÃO DA FOTO (HOME E PERFIL) */
/* Garante que a foto nunca fique achatada ou esticada (oval) */
#tech-home-photo, 
#perfil-foto {
    object-fit: cover !important; /* Corta a imagem para caber no círculo */
    aspect-ratio: 1 / 1;          /* Força ser um quadrado perfeito */
}

/* 2. CORREÇÃO DOS ÍCONES DO MENU PERFIL */
#perfil .list-group-item div:first-child {
    /* O container do ícone (aquele fundo colorido) */
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0 !important; /* Impede de encolher/esticar */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px !important; /* Bordas suaves */
}

/* Ajuste do texto do perfil para alinhar melhor */
#perfil .list-group-item {
    padding: 12px 15px !important;
    margin-bottom: 8px !important;
    border: none !important;
    background: white !important; /* Fundo branco limpo */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* 3. CORREÇÃO DA TELA DE METAS (BOTÕES DE DATA) */
/* Container dos selects */
#desempenho .d-flex.gap-1 {
    background: rgba(255,255,255,0.2); /* Fundo translúcido */
    padding: 4px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.3);
}

/* Os selects de Mês/Ano */
#performanceMesTecnico, 
#performanceAnoTecnico {
    border: none !important;
    background-color: transparent !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-align: center;
    cursor: pointer;
    box-shadow: none !important;
    padding-right: 25px; /* Espaço para a setinha */
    
    /* Muda a cor da setinha padrão do navegador para branco */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

/* Muda a cor das opções internas (que abrem no menu) para preto, senão somem */
#performanceMesTecnico option, 
#performanceAnoTecnico option {
    color: #333 !important;
    background-color: #fff !important;
}

/* 4. CORREÇÃO DA TELA DE CHAT (VISIBILIDADE) */

/* Container da lista (Deixa o fundo limpo) */
#tech-chat-list-window .card-body {
    background-color: transparent !important;
}

/* Item da Lista de Conversa (Card Branco Sólido) */
.tech-chat-list-item {
    background-color: #ffffff !important;
    opacity: 1 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    border: none !important;
    margin-bottom: 12px !important;
    padding: 15px !important;
}

/* Nomes e Textos no Chat (Força cor escura) */
.tech-chat-list-item .chat-list-item-name {
    color: #2C3E50 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
}

.tech-chat-list-item .chat-list-item-lastmsg {
    color: #64748b !important; /* Cinza médio */
    font-weight: 500 !important;
}

.tech-chat-list-item .text-muted {
    color: #94a3b8 !important; /* Cinza claro para a hora */
}

/* Título "Minhas Conversas" (Branco com sombra) */
#tech-chat-list-window h5 {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
    font-size: 1.8rem !important;
    margin-bottom: 20px !important;
}

/* Botão de Atualizar (Branco) */
#tech-chat-list-window .btn-outline-light {
    border-color: rgba(255,255,255,0.5) !important;
    background: rgba(255,255,255,0.1) !important;
    color: white !important;
}

/* =================================================================== */
/* === FIX FINAL DEFINITIVO (TÉCNICO) - Layout e Cores ============== */
/* =================================================================== */

/* 1. CORREÇÃO DAS DATAS "EMPILHADAS" (METAS) */
#desempenho .d-flex.justify-content-between {
    flex-wrap: nowrap !important; /* Impede que caia pra linha de baixo */
    align-items: center !important;
}

#desempenho .d-flex.gap-1 {
    background: rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 50px !important;
    padding: 2px 5px !important;
    white-space: nowrap !important; /* Texto não quebra */
    flex-shrink: 0 !important;      /* Não deixa esmagar */
    min-width: fit-content;
}

#performanceMesTecnico, 
#performanceAnoTecnico {
    color: #fff !important;
    font-weight: 700 !important;
    background-color: transparent !important;
    border: none !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

/* Opções do menu (para não ficarem brancas no fundo branco) */
#performanceMesTecnico option, 
#performanceAnoTecnico option {
    color: #333 !important;
    background-color: #fff !important;
}


/* 2. CORREÇÃO TOTAL DO CHAT (LISTA E MENSAGENS) */

/* Remove fundo do container principal para ver o azul */
#tech-chat-list-window, 
#tech-chat-list-window .card {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* ITEM DA LISTA (O Card Flutuante Branco) */
.tech-chat-list-item {
    background-color: #ffffff !important;
    border-radius: 16px !important;
    margin-bottom: 12px !important;
    padding: 15px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    border: none !important;
    opacity: 1 !important;
}

/* Força a cor dos textos dentro do item */
.tech-chat-list-item .chat-list-item-name {
    color: #2c3e50 !important; /* Azul Escuro */
    font-weight: 800 !important;
    font-size: 1rem !important;
}

.tech-chat-list-item .chat-list-item-lastmsg {
    color: #64748b !important; /* Cinza */
    font-weight: 500 !important;
}

/* Correção da Janela de Mensagens Aberta */
#tech-chat-message-window .card {
    background-color: #f8fafc !important; /* Fundo cinza claro sólido */
    border-radius: 20px 20px 0 0 !important; /* Arredondado só em cima */
    height: calc(100vh - 80px) !important; /* Ajuste de altura */
    margin-top: 20px !important;
}

#tech-chat-message-window .card-header {
    background-color: #ffffff !important;
    color: #2c3e50 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-radius: 20px 20px 0 0 !important;
}

#tech-chat-messages {
    background-color: #f1f5f9 !important; /* Fundo da área de mensagens */
}


/* 3. CORREÇÃO FINAL DO PERFIL (ÍCONES E FOTO) */

/* Foto Redonda Perfeita */
#perfil-foto, #tech-home-photo {
    border-radius: 50% !important;
    object-fit: cover !important;
    aspect-ratio: 1 / 1 !important;
}

/* Ícones Quadrados e Coloridos */
#perfil .list-group-item .d-flex .bg-dark,
#perfil .list-group-item .d-flex .bg-info,
#perfil .list-group-item .d-flex .bg-primary {
    width: 42px !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    margin-right: 15px !important;
    flex-shrink: 0 !important; /* Não deixa amassar */
}

/* Texto do item de menu */
#perfil .list-group-item {
    padding: 12px 15px !important;
    align-items: center !important;
}

/* =================================================================== */
/* === CORREÇÃO FINAL: CORES DO CHAT (FUNDO BRANCO / TEXTO ESCURO) = */
/* =================================================================== */

/* 1. O PAINEL (Fundo Branco Sólido) */
#tech-chat-list-window .card {
    background-color: #ffffff !important;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15) !important; /* Sombra forte para destacar do fundo azul */
}

/* 2. O CABEÇALHO (Fundo Branco) */
#tech-chat-list-window .card-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding-top: 20px !important;
    padding-bottom: 15px !important;
}

/* 3. O TÍTULO (AGORA ESCURO PARA APARECER) */
#tech-chat-list-window h5 {
    color: #2C3E50 !important; /* <--- AZUL ESCURO (O Segredo) */
    font-weight: 800 !important;
    font-size: 1.6rem !important;
    text-shadow: none !important; /* Remove a sombra de texto */
    margin-bottom: 0 !important;
}

/* 4. BOTÃO DE ATUALIZAR (COR ESCURA) */
#tech-chat-list-window .btn-outline-light {
    color: #3498DB !important; /* Ícone Azul Vibrante */
    border-color: #e2e8f0 !important; /* Borda cinza suave */
    background-color: transparent !important;
}

#tech-chat-list-window .btn-outline-light:active {
    background-color: #f1f5f9 !important;
}

/* 5. CORPO DA LISTA (Cinza bem claro para destacar os itens brancos) */
#tech-chat-list-window .card-body {
    background-color: #f8fafc !important;
}

/* Efeito de Marca D'água no Card do Veículo */
.vehicle-card-premium {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); /* Azul Noturno Premium */
    position: relative;
    overflow: hidden;
    color: white;
}

/* O ícone gigante transparente no fundo */
.vehicle-watermark {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 10rem;
    opacity: 0.05;
    transform: rotate(-10deg);
    pointer-events: none;
    color: white;
}

/* Scroll invisível mas funcional para o carrossel */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}