/* Estilos Gerais */
:root {
    --primary-color: #4e73df;
    --secondary-color: #6c757d;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fc;
    overflow-x: hidden;
}

/* Wrapper */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--primary-color) 10%, #224abe 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: all 0.3s;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(34, 74, 190, 0.3);
}

.sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.sidebar ul li {
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.sidebar ul li:hover {
    background: rgba(255, 255, 255, 0.15);
}

.sidebar ul li.active {
    background: rgba(255, 255, 255, 0.2);
    border-left: 4px solid white;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    display: block;
    font-weight: 500;
}

.sidebar ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    text-align: center;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.1);
}

/* Content */
.content-wrapper {
    flex: 1;
    padding-left: 260px;
    transition: all 0.3s;
}

/* Cards */
.card {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    border-top-left-radius: 0.5rem !important;
    border-top-right-radius: 0.5rem !important;
    padding: 1rem 1.25rem;
}

.card-header .font-weight-bold {
    color: var(--primary-color);
}

.border-left-primary {
    border-left: 0.25rem solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 0.25rem solid var(--success-color) !important;
}

.border-left-info {
    border-left: 0.25rem solid var(--info-color) !important;
}

.border-left-warning {
    border-left: 0.25rem solid var(--warning-color) !important;
}

.chart-area {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Tabelas Melhoradas */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #858796;
}

.table th, 
.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #e3e6f0;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #e3e6f0;
    background-color: #f8f9fc;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #e3e6f0;
}

.table-bordered thead th,
.table-bordered thead td {
    border-bottom-width: 2px;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(78, 115, 223, 0.05);
}

.table-hover tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.075);
    color: #6e707e;
}

.table-primary {
    background-color: #cdd8f6;
}

.table-primary thead th {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
}

/* Progress Bars */
.progress {
    height: 1rem;
    font-size: 0.75rem;
    background-color: #eaecf4;
    border-radius: 0.35rem;
    box-shadow: inset 0 0.1rem 0.1rem rgba(0, 0, 0, 0.1);
}

.progress-bar {
    background-color: var(--primary-color);
    transition: width 0.6s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: nowrap;
}

/* Media Queries para responsividade */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        min-height: auto;
        position: fixed;
        top: 0;
        left: -100%;
        z-index: 999;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .content-wrapper {
        padding-left: 0;
    }
    
    .close-sidebar {
        display: block;
        float: right;
        cursor: pointer;
    }
    
    .card-chart {
        height: 300px;
    }
    
    .search-box {
        width: 100% !important;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Botão de toggle para sidebar */
.sidebar-toggle {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

/* Navbar */
.navbar {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    background-color: white !important;
}

/* Tabelas */
.table-responsive {
    overflow-x: auto;
    border-radius: 0.5rem;
    box-shadow: 0 0.1rem 0.5rem rgba(58, 59, 69, 0.1);
}

/* Formulários */
.form-control {
    border-radius: 0.35rem;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d3e2;
}

.form-control:focus {
    border-color: #bac8f3;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.form-select {
    border-radius: 0.35rem;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d3e2;
    background-color: #fff;
}

/* Botões */
.btn {
    border-radius: 0.35rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.9rem;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background-color: #17a673;
    border-color: #169b6b;
}

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
}

.btn-warning:hover {
    background-color: #f4b30d;
    border-color: #e9aa0b;
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #e02d1b;
    border-color: #d52a1a;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Animações */
.chart-container {
    transition: all 0.3s ease;
}

.btn-block {
    width: 100%;
}

.float-end {
    float: right;
}

.form-check-input {
    width: 1.1em;
    height: 1.1em;
    margin-top: 0.25em;
    vertical-align: top;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid rgba(0, 0, 0, 0.25);
    appearance: none;
    color-adjust: exact;
}

.form-check-input[type="checkbox"] {
    border-radius: 0.25em;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Melhorias para tabelas responsivas em dispositivos móveis */
.table-responsive-horizontal {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
}

.mobile-table-notice {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
    position: relative;
}

.mobile-table-notice i {
    margin-right: 5px;
    animation: slide-horizontal 1s infinite alternate;
}

@keyframes slide-horizontal {
    from {
        transform: translateX(-3px);
    }
    to {
        transform: translateX(3px);
    }
}

.mobile-friendly-table {
    white-space: nowrap;
}

.mobile-friendly-table th,
.mobile-friendly-table td {
    padding: 0.6rem !important;
}

/* Para dispositivos muito pequenos, ajustar os botões */
@media (max-width: 576px) {
    .btn-sm {
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .mobile-friendly-table .badge {
        padding: 0.25rem 0.4rem;
        font-size: 0.7rem;
    }
    
    /* Fazer cabeçalhos de filtro ficarem um abaixo do outro em telas pequenas */
    .card-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .card-header .d-flex form {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .card-header .d-flex form .input-group {
        width: 100%;
        margin-right: 0 !important;
    }
    
    /* Melhorar legibilidade da paginação */
    .pagination .page-link {
        padding: 0.4rem 0.65rem;
    }
}

/* Ajustes para os botões de ação em lote em dispositivos móveis */
@media (max-width: 768px) {
    .row.mb-3 .col, 
    .row.mb-3 .col-auto {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-group {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
    }
    
    .btn-group .btn {
        flex: 1 1 auto;
    }
    
    #select-batch-action {
        width: 70% !important;
    }
    
    #apply-batch-action {
        width: 25%;
    }
} 