/* Estilos gerais */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* Dashboard moderno */
.dashboard-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.dashboard-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--cor-principal) 0%, #0097fb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 1rem;
}

.navbar {
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.nav-link {
    font-weight: 500;
    padding: 0.8rem 1.2rem !important;
    border-radius: 8px;
    margin: 0 0.3rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

.nav-link.active {
    background-color: rgba(255,255,255,0.2);
}

.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: none;
    font-weight: 600;
}

.btn {
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.status-box {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 500;
}

.required-field::after {
    content: "*";
    color: red;
    margin-left: 2px;
}

/* Estilos do Dashboard */
.dashboard-card {
    transition: all 0.3s;
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dashboard-icon {
    font-size: 2rem;
    color: #007bff;
}

/* Status dos orçamentos */
.status-box {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    text-align: center;
}

.status-pendente {
    background-color: #6c757d !important;
    color: white !important;
}

.status-aprovado {
    background-color: #198754;
    color: white;
}

.status-rejeitado {
    background-color: #dc3545;
    color: white;
}

.status-pago {
    background-color: #198754; /* Verde */
    color: white;
}

.status-pago-parcial {
    background-color: #fd7e14; /* Laranja */
    color: white;
}

.status-faturado {
    background-color: #6f42c1; /* Roxo */
    color: white;
}

/* Status de execução */
.status-agendado {
    background-color: #0d6efd; /* Azul com letra branca para instalacao_agendada */
    color: white;
}

/* Status em andamento - usado para orçamentos e instalações */
.status-andamento,
.status-instalacao-em-andamento,
.status-orcamento-em-andamento {
    background-color: #fd7e14 !important; /* Laranja com letra branca */
    color: white !important;
}

/* Status finalizado - usado para orçamentos e instalações */
.status-finalizado,
.status-instalacao-finalizada,
.status-orcamento-finalizado {
    background-color: #198754; /* Verde com letra branca igual do aprovado */
    color: white;
}

/* Status específico para orçamento agendado */
.status-orcamento_agendado {
    background-color: #6f42c1; /* Roxo com letra branca */
    color: white;
}



/* Classes personalizadas para badges no Bootstrap */
.bg-purple {
    background-color: #6f42c1 !important;
}

.bg-orange {
    background-color: #fd7e14 !important;
}

/* Estoque */
.estoque-baixo {
    background-color: #fff3cd !important;
}

.estoque-critico {
    background-color: #f8d7da !important;
}

/* Tabelas */
.table-orcamento th {
    background-color: #f5f5f5;
}

/* Formulários */
.form-label {
    font-weight: 500;
}

/* Header e navegação */
.navbar-brand img {
    height: 40px;
    margin-right: 10px;
}

.sidebar {
    min-width: 250px;
    max-width: 250px;
    min-height: 100vh;
    background: #343a40;
    color: #fff;
    transition: all 0.3s;
}

.sidebar.active {
    margin-left: -250px;
}

.sidebar .nav-link {
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 2px 10px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Rodapé */
footer {
    border-top: 1px solid #e9ecef;
}

/* Impressão de orçamentos */
@media print {
    .no-print {
        display: none !important;
    }

    .orcamento-container {
        padding: 20px;
        font-size: 12pt;
    }

    .table-orcamento {
        width: 100%;
        border-collapse: collapse;
    }

    .table-orcamento th,
    .table-orcamento td {
        border: 1px solid #ddd;
        padding: 8px;
    }

    .orcamento-header,
    .orcamento-footer {
        margin-bottom: 20px;
    }
}

/* Selo de Garantia Flutuante */
.selo-garantia-flutuante {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0056b3, #00a0ff);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    border: 3px solid #fff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 4px;
    animation: pulse 2s infinite;
}

.selo-garantia-flutuante:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.selo-garantia-flutuante i {
    font-size: 1.2rem;
    margin-bottom: 0;
}

.selo-texto-pequeno {
    font-size: 0.6rem;
    margin-top: -2px;
    font-weight: bold;
    display: block;
}

.selo-garantia-flutuante span {
    line-height: 0.9;
    letter-spacing: -0.5px;
    font-size: 0.65rem;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 86, 179, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 86, 179, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 86, 179, 0);
    }
}

/* Modal do Selo de Garantia */
.modal-garantia .modal-header {
    background: linear-gradient(135deg, #198754, #20c997);
    color: white;
    border-radius: 10px 10px 0 0;
    border-bottom: 2px solid #000;
}

.modal-garantia .modal-body {
    padding: 25px;
}

.modal-garantia .garantia-icon {
    font-size: 3rem;
    color: #198754;
    margin-bottom: 15px;
}

.modal-garantia .garantia-destaque {
    background-color: #f8f9fa;
    border-left: 4px solid #198754;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 5px 5px 0;
}

.modal-garantia .garantia-check {
    color: #198754;
    margin-right: 5px;
}

.modal-garantia .garantia-logo {
    max-width: 150px;
    margin: 0 auto 20px;
    display: block;
}

.modal-garantia .garantia-titulo {
    color: #198754;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Sistema de notificações */
.notificacoes-toggle {
    position: relative;
    cursor: pointer;
}

.notificacoes-contador {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.notificacoes-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background-color: white;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.175);
    z-index: 1000;
    display: none;
    max-height: 500px;
    overflow-y: auto;
}

.notificacoes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,.15);
    background-color: #f8f9fa;
}

.notificacoes-titulo {
    font-weight: bold;
    margin-bottom: 0;
}

.notificacoes-marcar-lidas {
    font-size: 0.8rem;
    color: #0d6efd;
    cursor: pointer;
    text-decoration: none;
}

.notificacoes-marcar-lidas:hover {
    text-decoration: underline;
}

.notificacoes-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Cabeçalho de categoria */
/* Categorias de notificações na horizontal */
.notificacoes-categorias {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 8px 10px;
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,.15);
    position: sticky;
    top: 0;
    z-index: 5;
}

.notificacao-categoria {
    padding: 5px 12px;
    background-color: #edf2f7;
    font-weight: bold;
    font-size: 0.8rem;
    color: #4a5568;
    border-radius: 15px;
    margin-right: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.notificacao-categoria:hover {
    background-color: #e2e8f0;
}

.notificacao-categoria.active {
    background-color: var(--cor-principal);
    color: white;
}

.notificacao-categoria-content {
    display: none;
}

.notificacao-categoria-content.active {
    display: block;
}

/* Manter para compatibilidade */
.notificacao-categoria-header {
    display: none; /* Ocultar o cabeçalho antigo */
}

.categoria-titulo {
    border-left: 3px solid #0d6efd;
    padding-left: 8px;
}

.notificacao-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,.15);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.notificacao-item:last-child {
    border-bottom: none;
}

.notificacao-item:hover {
    background-color: #f8f9fa;
}

.notificacao-item.lida {
    opacity: 0.7;
}

.notificacao-conteudo {
    display: flex;
    align-items: flex-start;
}

.notificacao-icone {
    margin-right: 10px;
    font-size: 1.2rem;
    padding-top: 2px;
}

.notificacao-info {
    flex: 1;
}

.notificacao-mensagem {
    margin-bottom: 5px;
}

.notificacao-tempo {
    font-size: 0.75rem;
    color: #6c757d;
}

.notificacoes-footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid rgba(0,0,0,.15);
    text-align: center;
}

.notificacoes-ver-todas {
    color: #0d6efd;
    text-decoration: none;
}

.notificacoes-ver-todas:hover {
    text-decoration: underline;
}

.notificacoes-vazia {
    padding: 1.5rem;
    text-align: center;
    color: #6c757d;
}

/* Suporte ao Dark Mode para notificações */
body.dark-mode .notificacoes-dropdown {
    background-color: #333;
    border-color: #444;
}

body.dark-mode .notificacoes-header {
    background-color: #444;
    border-color: #555;
}

body.dark-mode .notificacao-item:hover {
    background-color: #444;
}

body.dark-mode .notificacao-tempo {
    color: #adb5bd;
}

body.dark-mode .notificacoes-footer {
    border-color: #555;
}

body.dark-mode .notificacoes-vazia {
    color: #adb5bd;
}

body.dark-mode .notificacoes-categorias {
    background-color: #2d3748;
    border-color: #4a5568;
}

body.dark-mode .notificacao-categoria {
    background-color: #4a5568;
    color: #e2e8f0;
}

body.dark-mode .notificacao-categoria:hover {
    background-color: #718096;
}

body.dark-mode .notificacao-categoria.active {
    background-color: var(--cor-principal);
    color: white;
}

body.dark-mode .notificacao-categoria-header {
    background-color: #2d3748;
    color: #e2e8f0;
}

body.dark-mode .categoria-titulo {
    border-left-color: #3182ce;
}

/* Responsividade */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
    }

    .sidebar.active {
        margin-left: 0;
    }
    
    .notificacoes-dropdown {
        width: 300px;
        right: -75px;
    }
}