/* ========================================
   ESTILOS PADRÃO PARA TELAS DE LISTAGEM
   ======================================== */

/* ========================================
   ESTILOS GERAIS
   ======================================== */

/* Prevenir overflow horizontal */
body {
    overflow-x: hidden;
}

.container-fluid {
    max-width: 100%;
    overflow-x: hidden;
}

.table-responsive {
    border: none;
}

/* ========================================
   ESTILOS DE TABELA
   ======================================== */

.table {
    margin-bottom: 0;
}

.table thead th {
    border-top: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
    transition: background-color 0.2s ease;
}

.table tbody td {
    vertical-align: middle;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ========================================
   ESTILOS DE BADGES
   ======================================== */

.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

.badge.bg-info {
    background-color: #17a2b8 !important;
}

/* ========================================
   ESTILOS DE BOTÕES
   ======================================== */

.btn-group-vertical .btn {
    margin-bottom: 2px;
    border-radius: 0.375rem !important;
}

.btn-group-vertical .btn:last-child {
    margin-bottom: 0;
}

.btn-group .btn {
    border-radius: 0.375rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
}

/* ========================================
   ESTILOS DE PAGINAÇÃO
   ======================================== */

.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    border-radius: 0.375rem;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    color: #495057;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
}

/* ========================================
   ESTILOS DE FORMULÁRIOS
   ======================================== */

.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
}

.input-group .btn {
    border-radius: 0 0.375rem 0.375rem 0;
}

.input-group .form-control {
    border-radius: 0.375rem 0 0 0.375rem;
}

/* ========================================
   ESTILOS DE MODAL
   ======================================== */

.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    border-radius: 0.5rem 0.5rem 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 0.5rem 0.5rem;
}

/* ========================================
   ESTILOS RESPONSIVOS - MOBILE
   ======================================== */

@media (max-width: 768px) {
    /* Ocultar elementos em mobile */
    .mobile-hide {
        display: none !important;
    }
    
    /* Tabela responsiva */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Botões verticais */
    .btn-group-vertical .btn {
        margin-bottom: 2px;
    }
    
    .btn-group-vertical .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Paginação */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Input group */
    .input-group {
        flex-wrap: wrap;
    }
    
    .input-group .btn {
        flex: 1;
        min-width: auto;
    }
    
    /* Form select */
    .form-select {
        max-width: 100px;
    }
    
    /* Títulos */
    h2 {
        font-size: 1.5rem;
    }
    
    /* Tabela */
    .table {
        font-size: 0.875rem;
    }
    
    /* Badges */
    .badge {
        font-size: 0.75rem;
    }
    
    /* Botões pequenos */
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* ========================================
   ESTILOS RESPONSIVOS - MOBILE PEQUENO
   ======================================== */

@media (max-width: 576px) {
    /* Container */
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Tabela */
    .table {
        font-size: 0.875rem;
    }
    
    /* Badges */
    .badge {
        font-size: 0.75rem;
    }
    
    /* Botões pequenos */
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Títulos */
    h2 {
        font-size: 1.5rem;
    }
    
    /* Cards (para tela de monitoramento) */
    .card {
        margin-bottom: 0.5rem;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .card-footer {
        padding: 0.5rem 0.75rem;
    }
    
    /* Ícones */
    .fa-2x {
        font-size: 1.5em;
    }
    
    /* Títulos de cards */
    h3 {
        font-size: 1.5rem;
    }
    
    h5 {
        font-size: 1rem;
    }
}

/* ========================================
   ESTILOS ESPECÍFICOS PARA MONITORAMENTO
   ======================================== */

/* Cards de estatísticas */
.card.bg-success,
.card.bg-warning,
.card.bg-secondary,
.card.bg-info {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card.bg-success:hover,
.card.bg-warning:hover,
.card.bg-secondary:hover,
.card.bg-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Cards de quadras */
.quadra-card .card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.quadra-card .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}

.quadra-card .card-header {
    background-color: rgba(0,0,0,0.02);
    border-bottom: 1px solid rgba(0,0,0,0.125);
}

.quadra-card .card-footer {
    background-color: rgba(0,0,0,0.02);
    border-top: 1px solid rgba(0,0,0,0.125);
}

/* Loading spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* ========================================
   ANIMAÇÕES E TRANSITIONS
   ======================================== */

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   UTILITÁRIOS
   ======================================== */

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.user-select-none {
    user-select: none;
}

/* ========================================
   ESTILOS DE ACESSIBILIDADE
   ======================================== */

.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   ESTILOS DE ESTADOS
   ======================================== */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ========================================
   ESTILOS DE ALERTAS
   ======================================== */

.alert {
    border-radius: 0.375rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
} 