/**
 * Estilos Customizados - Veloz Caça Vazamentos
 */

/* ======= Layout Geral ======= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.footer {
    margin-top: auto;
}

/* ======= Navbar ======= */
.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

.nav-link {
    transition: background-color 0.3s ease;
    border-radius: 5px;
    margin: 0 5px;
}

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

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

/* ======= Cards ======= */
.card {
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.card-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* ======= Tabelas ======= */
.table-responsive {
    border-radius: 10px;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* DataTables customization */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin: 10px 0;
}

/* ======= Badges ======= */
.badge {
    padding: 0.5em 0.75em;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ======= Botões ======= */
.btn {
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* ======= Formulários ======= */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* ======= Dashboard Cards ======= */
.dashboard-card {
    border-left: 4px solid;
    margin-bottom: 20px;
}

.dashboard-card.primary {
    border-left-color: #0d6efd;
}

.dashboard-card.success {
    border-left-color: #198754;
}

.dashboard-card.warning {
    border-left-color: #ffc107;
}

.dashboard-card.danger {
    border-left-color: #dc3545;
}

.dashboard-card .card-body {
    padding: 1.5rem;
}

.dashboard-card h3 {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

.dashboard-card p {
    margin: 0;
    color: #6c757d;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-card i {
    font-size: 2.5rem;
    opacity: 0.3;
}

/* ======= Charts ======= */
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

/* ======= Alerts ======= */
.alert {
    border-radius: 10px;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: #198754;
}

.alert-danger {
    border-left-color: #dc3545;
}

.alert-warning {
    border-left-color: #ffc107;
}

.alert-info {
    border-left-color: #0dcaf0;
}

/* ======= Status Badges ======= */
.status-badge {
    min-width: 100px;
    display: inline-block;
    text-align: center;
}

/* ======= Action Buttons ======= */
.action-buttons .btn {
    margin: 0 2px;
}

/* ======= Loading Spinner ======= */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* ======= Responsive ======= */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .dashboard-card h3 {
        font-size: 1.5rem;
    }

    .table {
        font-size: 0.875rem;
    }

    .btn-sm {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }

    .action-buttons .btn {
        margin: 2px 0;
        display: block;
        width: 100%;
    }
}

/* ======= Utilities ======= */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cursor-pointer {
    cursor: pointer;
}

.shadow-sm-hover:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* ======= Print Styles ======= */
@media print {
    .navbar,
    .footer,
    .btn,
    .action-buttons,
    .dataTables_filter,
    .dataTables_length,
    .dataTables_paginate {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}
