/* Paleta de cores
 * #f5ea95 - Amarelo claro (acentos, destaques)
 * #fc8e5b - Laranja (alertas, botões secundários)
 * #fc5956 - Vermelho coral (notificações, erros)
 * #c93e4f - Vermelho escuro (destaques importantes)
 * #3d1734 - Roxo escuro (texto principal, backgrounds)
 */

/* Reset e Estilos gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f5f5f5;
    color: #333;
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 15px;
}

.container-fluid {
    flex: 1;
    padding: 2rem;
    max-width: 1300px;
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #3d1734;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p, li, td, th, label, button {
    font-size: 0.95rem;
}

small {
    font-size: 0.85rem;
}

/* Navbar estilo industrial */
.navbar {
    background-color: rgba(154, 25, 27, 0.9); /* Vermelho bordô mais opaco */
    box-shadow: 0 3px 5px rgba(0,0,0,0.15);
    padding: 0.8rem 2rem;
    border-bottom: 3px solid #fc8e5b;
}

.bg-navbar {
    background-color: rgba(154, 25, 27, 0.9) !important; /* Vermelho bordô mais opaco */
}

.navbar-brand {
    font-weight: 700;
    color: #ffffff;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
    color: #fff;
    font-weight: 600;
    padding: 0.6rem 1rem;
    transition: all 0.2s;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link:hover {
    color: #fc8e5b;
}

.navbar-nav .nav-link.active {
    color: #f5ea95;
    border-bottom: 3px solid #f5ea95;
}

/* Cards com estilo industrial */
.card {
    border: none;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-top: 4px solid #3d1734;
}

/* Removido efeito hover dos cards */

.card-header {
    background-color: #f8f8f8;
    border-bottom: 2px solid rgba(61, 23, 52, 0.15);
    padding: 1.5rem;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #3d1734;
}

.card-body {
    padding: 1.75rem;
    background-color: #fff;
}

/* Métricas destacadas com estilo industrial */
.metric-card {
    display: flex;
    align-items: center;
    border-left: 6px solid;
    padding: 1.75rem;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-radius: 6px;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
    height: 100%;
}

/* Removido efeito hover dos metric-cards */

.metric-card.primary {
    border-left-color: #fc8e5b;
    border-top: 1px solid rgba(252, 142, 91, 0.3);
    border-right: 1px solid rgba(252, 142, 91, 0.3);
    border-bottom: 1px solid rgba(252, 142, 91, 0.3);
}

.metric-card.success {
    border-left-color: #f5ea95;
    border-top: 1px solid rgba(245, 234, 149, 0.3);
    border-right: 1px solid rgba(245, 234, 149, 0.3);
    border-bottom: 1px solid rgba(245, 234, 149, 0.3);
}

.metric-card.warning {
    border-left-color: #fc5956;
    border-top: 1px solid rgba(252, 89, 86, 0.3);
    border-right: 1px solid rgba(252, 89, 86, 0.3);
    border-bottom: 1px solid rgba(252, 89, 86, 0.3);
}

.metric-card.danger {
    border-left-color: #c93e4f;
    border-top: 1px solid rgba(201, 62, 79, 0.3);
    border-right: 1px solid rgba(201, 62, 79, 0.3);
    border-bottom: 1px solid rgba(201, 62, 79, 0.3);
}

.card-stat {
    border-left: none;
    border-top: 4px solid;
    height: 210px; /* Altura fixa para todos os cards, um pouco menor */
    background-color: #ffffff;
}

.card-stat.primary {
    border-top-color: #3d1734;
}

.card-stat.success {
    border-top-color: #5cb85c;
}

.card-stat.warning {
    border-top-color: #fc5956;
}

.card-stat.danger, .card-stat.info {
    border-top-color: #5bc0de;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #3d1734;
    line-height: 1.2;
}

.metric-label {
    font-size: 1rem;
    color: rgba(61, 23, 52, 0.8);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

/* Tabelas com estilo industrial */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.table th {
    text-align: left;
    padding: 1rem 0.9rem;
    font-weight: 700;
    background-color: #f2f2f2;
    border-bottom: 2px solid rgba(61, 23, 52, 0.2);
    color: #3d1734;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.table td {
    padding: 0.9rem 0.9rem;
    border-bottom: 1px solid rgba(61, 23, 52, 0.1);
    vertical-align: middle;
}

/* Removido efeito hover das linhas da tabela */

.table tbody tr:nth-child(even) {
    background-color: #f8f8f8;
}

/* Progress bars com estilo industrial */
.progress {
    height: 12px;
    background-color: #e2e2e2;
    border-radius: 6px;
    overflow: hidden;
    margin: 0.75rem 0 0.5rem 0;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}

/* Customizações para cards do dashboard */
.card-stat .progress {
    margin-top: 0.75rem;
}

.d-flex.justify-content-between.align-items-center {
    margin-bottom: 0.5rem;
    min-height: 60px; /* Altura mínima fixa para alinhamento, um pouco menor */
}

.progress-bar {
    height: 100%;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.progress-bar.success, .bg-success {
    background-color: #5cb85c;
}

.progress-bar.warning, .bg-warning {
    background-color: #fc8e5b;
}

.progress-bar.danger, .bg-danger {
    background-color: #fc5956;
}

.progress-bar.bg-primary, .bg-primary {
    background-color: #3d1734;
    color: #ffffff;
}

.progress-bar.bg-info, .bg-info {
    background-color: #5bc0de;
}

.btn-info {
    background-color: #5bc0de;
    color: #fff;
}

.btn-info:hover {
    background-color: #46b8da;
}

.progress-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #3d1734;
    margin-top: 0.5rem;
}

/* Estilo para texto pequeno nos cards */
.card-stat .text-muted {
    font-size: 0.85rem;
}

/* Estilo para a exibição da data */
.data-display {
    display: inline-block;
    background-color: #f5f5f5;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    border-left: 3px solid #3d1734;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.data-hoje {
    font-size: 1.1rem;
    color: #3d1734;
}

/* Form control específico para botões menores */
.form-control-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    height: calc(1.5em + 0.5rem + 2px);
}

/* Botões com estilo industrial */
.btn {
    display: inline-block;
    padding: 0.9rem 1.75rem;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

/* Botões menores para ações nas tabelas */
.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 3px;
    margin-right: 3px;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Container para botões de ação na tabela */
.action-buttons {
    white-space: nowrap;
    display: flex;
    justify-content: flex-start;
    gap: 5px;
    min-width: 90px; /* Garante largura mínima para os botões */
}

/* Classe para truncar texto com elipse */
.text-truncate-custom {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.btn-primary {
    background-color: #3d1734;
    color: #fff;
    border-bottom: 3px solid #2a1023;
}

.btn-primary:hover {
    background-color: #521f47;
}

.btn-secondary {
    background-color: #fc8e5b;
    color: #3d1734;
    border-bottom: 3px solid #ea7d4a;
}

.btn-secondary:hover {
    background-color: #fd9a6d;
}

.btn-success {
    background-color: #5cb85c;
    color: #fff;
    border-bottom: 3px solid #4cae4c;
}

.btn-success:hover {
    background-color: #6ec06e;
}

.btn-danger {
    background-color: #fc5956;
    color: #fff;
    border-bottom: 3px solid #ea4845;
}

.btn-danger:hover {
    background-color: #fd7370;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #3d1734;
    color: #3d1734;
}

.btn-outline:hover {
    background-color: rgba(61, 23, 52, 0.05);
}

/* Botão flutuante */
.btn-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #c93e4f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(201, 62, 79, 0.4);
    z-index: 1000;
    transition: all 0.3s;
    font-size: 1.5rem;
}

.btn-float:hover {
    background-color: #d84c5d;
}

/* Formulários com estilo industrial */
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #3d1734;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: all 0.3s;
    margin-bottom: 1rem;
    background-color: #f9f9f9;
}

/* Campos específicos para lançamentos */
.valor-produtos, .valor-servicos {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    text-align: right;
}

.form-control:focus {
    outline: none;
    border-color: #ddd;
    box-shadow: none;
    background-color: #fff;
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Estilos para meta diária na tabela de lançamentos */
.meta-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.meta-diaria {
    font-weight: 600;
    font-size: 0.95rem;
}

.diferenca-meta {
    margin-top: 0.25rem;
}

/* Gráficos */
.chart-container {
    position: relative;
    width: 100%;
    padding: 0.5rem;
}

.chart-canvas-container {
    position: relative;
    width: 100%;
    height: 350px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chart-canvas-container.chart-large {
    height: 450px;
}

canvas {
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
    display: block !important;
}

.chart-info {
    margin-top: 2rem;
    font-size: 0.9rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 4px;
    border-top: 2px solid rgba(61, 23, 52, 0.1);
    position: relative;
    z-index: 10;
    clear: both;
}

.equal-height-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.equal-height-card .card-body {
    flex: 1;
}

.total-value {
    font-weight: 700;
    color: #3d1734;
    font-size: 1.1rem;
}

.small.text-muted {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fw-bold {
    font-weight: 700 !important;
    color: #3d1734;
    font-size: 1rem;
}

.badge-success, .bg-success {
    background-color: #5cb85c !important;
    color: #fff;
}

.badge-warning, .bg-warning {
    background-color: #fc8e5b !important;
    color: #3d1734;
}

.badge-danger, .bg-danger {
    background-color: #fc5956 !important;
    color: #fff;
}

.badge-secondary, .bg-secondary {
    background-color: #6c757d !important;
    color: #fff;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.status-indicator.online {
    background-color: #5cb85c;
}

.status-indicator.warning {
    background-color: #fc8e5b;
}

.status-indicator.danger {
    background-color: #fc5956;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 2rem;
    text-align: center;
    font-size: 1rem;
    color: rgba(61, 23, 52, 0.8);
    border-top: 1px solid rgba(61, 23, 52, 0.1);
    background-color: #f2f2f2;
}

/* Ícones mais destacados */
.fa-2x {
    font-size: 2.5rem;
}

.card-stat .text-primary,
.card-stat .text-success,
.card-stat .text-warning,
.card-stat .text-info,
.card-stat .text-danger {
    margin-left: auto;
    align-self: flex-start;
}

.text-primary {
    color: #3d1734 !important;
}

.text-success {
    color: #5cb85c !important;
}

.text-warning {
    color: #fc8e5b !important;
}

.text-danger {
    color: #fc5956 !important;
}

.text-info {
    color: #5bc0de !important;
}

.text-muted {
    color: #6c757d !important;
    font-size: 0.95rem;
}

/* Alertas */
.alert {
    padding: 1.25rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    border-left: 4px solid;
    font-size: 1.05rem;
}

.alert-info {
    background-color: rgba(91, 192, 222, 0.15);
    border-left-color: #5bc0de;
    color: #31708f;
}

.alert-success {
    background-color: rgba(92, 184, 92, 0.15);
    border-left-color: #5cb85c;
    color: #3c763d;
}

.alert-warning {
    background-color: rgba(252, 142, 91, 0.15);
    border-left-color: #fc8e5b;
    color: #8a6d3b;
}

.alert-danger {
    background-color: rgba(252, 89, 86, 0.15);
    border-left-color: #fc5956;
    color: #a94442;
}

/* Responsividade */
@media (max-width: 768px) {
    .container-fluid {
        padding: 1.5rem;
    }
    
    .metric-value {
        font-size: 2rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .table {
        font-size: 0.95rem;
    }
    
    .table th, .table td {
        padding: 1rem 0.75rem;
    }
    
    .navbar {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
    }
    
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.9rem; }
    h3 { font-size: 1.6rem; }
    
    .card-stat {
        height: auto;
        margin-bottom: 1rem;
    }
}

/* Ajustes específicos para o dashboard */
.row.mb-4 {
    margin-bottom: 1.5rem !important;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-in-out;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #3d1734;
    border-radius: 5px;
}

/* Removido efeito hover da scrollbar */

/* Card Stat customizações */
.card-stat {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-stat .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-stat .card-subtitle {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    height: 20px; /* Altura fixa para alinhamento */
}

.card-stat .card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    height: 34px; /* Altura fixa para alinhamento */
}

/* Ajustes para cards no index */
.row .col-md-3 {
    margin-bottom: 1.5rem;
}

.row .col-md-3 .card {
    height: 100%;
}

.card-stat small.text-muted {
    margin-bottom: 0.75rem;
    display: block;
    height: 24px; /* Altura fixa para alinhamento */
}

/* Adicional para estilo de oficina/industrial */
.bg-stripe {
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0,0,0,0.05) 10px,
        rgba(0,0,0,0.05) 20px
    );
}

/* Modal personalizados */
.modal-header {
    background-color: #3d1734;
    color: #fff;
    border-bottom: none;
    padding: 1.5rem;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.modal-title {
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    background-color: #f8f8f8;
    padding: 1.25rem;
    border-top: 1px solid #ddd;
}

.modal-content {
    border: none;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-close {
    color: #fff;
    opacity: 1;
}