/* Variáveis de cores */
:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --background-color: #f8fafc;
    --sidebar-color: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --hover-color: #f1f5f9;
}

/* Reset e estilos base */
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background-color: #f8f9fa;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: #ffffff;
    color: var(--text-color);
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
}

.sidebar-header {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-color);
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.sidebar-nav a:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
}

.sidebar-nav a.active {
    background-color: rgba(59, 130, 246, 0.12);
    color: var(--primary-color);
}

.sidebar-nav i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* Sidebar Dropdown */
.sidebar-dropdown {
    position: relative;
}

.sidebar-dropdown > a {
    cursor: pointer;
}

.sidebar-dropdown .bi-chevron-down {
    transition: transform 0.3s ease;
}

.sidebar-dropdown.open .bi-chevron-down {
    transform: rotate(180deg);
}

.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #f9fafb;
    border-radius: 0.5rem;
    margin-top: 0.25rem;
}

.sidebar-dropdown.open .sidebar-submenu {
    max-height: 200px;
}

.sidebar-submenu li {
    margin: 0;
}

.sidebar-submenu a {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.sidebar-submenu a:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
}

.sidebar-submenu a.active {
    background-color: rgba(59, 130, 246, 0.12);
    color: var(--primary-color);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 0.75rem;
}

.user-info .user-details {
    flex: 1;
}

.user-info .user-name {
    font-weight: 500;
    margin: 0;
    font-size: 0.9rem;
}

.user-info .user-role {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-title h1 {
    font-size: 1.75rem;
    margin: 0;
    color: #111827; /* texto mais neutro e legível */
}

.header-title p {
    margin: 0.5rem 0 0;
    color: #6c757d;
}

/* Cards */
.card {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1rem 1.25rem;
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-body {
    padding: 1.25rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: #2c3e50;
    border-bottom-width: 1px;
}

.table td {
    vertical-align: middle;
}

/* Buttons */
.btn-group {
    display: flex;
    gap: 0.25rem;
}

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

/* Badges */
.badge {
    padding: 0.5em 0.75em;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
    }

    .dashboard-container {
        flex-direction: column;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Paginação */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: var(--text-color);
    border-color: var(--border-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Ajustes para telas muito pequenas */
@media (max-width: 360px) {
    .main-content {
        padding: 0.25rem;
    }

    .card-body {
        padding: 0.25rem;
    }

    .btn {
        padding: 0.25rem 0.375rem;
        font-size: 0.75rem;
    }
}

/* Ajustes para telas grandes */
@media (min-width: 1200px) {
    .container-fluid {
        max-width: 1400px;
        margin: 0 auto;
        padding: 1.5rem;
    }

    .card {
        margin-bottom: 1.5rem;
    }

    .table th, .table td {
        padding: 1rem;
    }
}

/* Ajustes para telas médias */
@media (min-width: 768px) and (max-width: 1199px) {
    .container-fluid {
        padding: 1rem;
    }

    .card {
        margin-bottom: 1.25rem;
    }
}

/* Ajustes para impressão */
@media print {
    .sidebar, .header, .btn, .no-print {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
    }

    .table {
        width: 100% !important;
    }

    .table th, .table td {
        border: 1px solid #dee2e6 !important;
    }
}

/* Formulários */
.form-label {
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control {
    border-color: var(--border-color);
    padding: 0.5rem 0.75rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Alertas */
.alert {
    border: none;
    border-radius: 0.5rem;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Modais */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    background-color: #f8fafc;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    background-color: #f8fafc;
}

/* Filtros de Mensalidades */
.filtros-mensalidades {
    margin-bottom: 0;
}

.filtros-mensalidades .row {
    margin: 0;
    align-items: flex-end;
}

.filtros-mensalidades .col-md-2,
.filtros-mensalidades .col-md-4 {
    padding: 0.25rem;
}

.filtros-mensalidades .form-label {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.filtros-mensalidades .form-select,
.filtros-mensalidades .form-control {
    height: 31px;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.filtros-mensalidades .btn {
    height: 31px;
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.filtros-mensalidades .btn i {
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .filtros-mensalidades .col-md-2,
    .filtros-mensalidades .col-md-4 {
        padding: 0.25rem;
    }
    
    .filtros-mensalidades .btn {
        margin-top: 0.5rem;
    }
}

/* Gradientes para cards do dashboard e clientes */
.card-dashboard {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 1.5rem 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}
.bg-gradient-blue {
    background: linear-gradient(135deg, #3b5bfd 0%, #4568dc 100%);
    color: #fff !important;
}
.bg-gradient-cyan {
    background: linear-gradient(135deg, #36d1c4 0%, #1fa2ff 100%);
    color: #fff !important;
}
.bg-gradient-yellow {
    background: linear-gradient(135deg, #f9d423 0%, #ffb347 100%);
    color: #212529 !important;
}
.bg-gradient-red {
    background: linear-gradient(135deg, #ff5858 0%, #f857a6 100%);
    color: #fff !important;
}
.bg-gradient-green {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #fff !important;
} 