/* Estilos para a Página de Administrador - Finance Dashboard */

/* Botões principais */
.btn-primary {
    @apply bg-blue-600 text-white px-4 py-2 rounded-lg font-medium hover:bg-blue-700 transition-colors;
}

.btn-secondary {
    @apply bg-gray-600 text-white px-4 py-2 rounded-lg font-medium hover:bg-gray-700 transition-colors;
}

.btn-danger {
    @apply bg-red-600 text-white px-4 py-2 rounded-lg font-medium hover:bg-red-700 transition-colors;
}

.btn-success {
    @apply bg-green-600 text-white px-4 py-2 rounded-lg font-medium hover:bg-green-700 transition-colors;
}

/* Cards de estatísticas */
.stat-card {
    @apply bg-white rounded-lg shadow p-6 transition-all duration-200 hover:shadow-lg;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    @apply p-3 rounded-full text-2xl;
}

.stat-icon.blue {
    @apply bg-blue-100 text-blue-600;
}

.stat-icon.green {
    @apply bg-green-100 text-green-600;
}

.stat-icon.yellow {
    @apply bg-yellow-100 text-yellow-600;
}

.stat-icon.purple {
    @apply bg-purple-100 text-purple-600;
}

.stat-info {
    @apply ml-4;
}

.stat-label {
    @apply text-sm font-medium text-gray-600;
}

.stat-value {
    @apply text-2xl font-semibold text-gray-900;
}

/* Tabelas administrativas */
.admin-table {
    @apply min-w-full divide-y divide-gray-200;
}

.admin-table thead {
    @apply bg-gray-50;
}

.admin-table th {
    @apply px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider;
}

.admin-table tbody {
    @apply bg-white divide-y divide-gray-200;
}

.admin-table td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900;
}

.admin-table .actions {
    @apply text-sm font-medium space-x-2;
}

/* Status badges */
.status-badge {
    @apply px-2 py-1 text-xs font-medium rounded-full;
}

.status-badge.active {
    @apply bg-green-100 text-green-800;
}

.status-badge.inactive {
    @apply bg-gray-100 text-gray-800;
}

.status-badge.suspended {
    @apply bg-red-100 text-red-800;
}

.status-badge.paid {
    @apply bg-green-100 text-green-800;
}

.status-badge.pending {
    @apply bg-yellow-100 text-yellow-800;
}

.status-badge.overdue {
    @apply bg-red-100 text-red-800;
}

.status-badge.cancelled {
    @apply bg-gray-100 text-gray-800;
}

/* Botões de ação */
.action-btn {
    @apply text-sm font-medium transition-colors;
}

.action-btn.edit {
    @apply text-blue-600 hover:text-blue-900;
}

.action-btn.delete {
    @apply text-red-600 hover:text-red-900;
}

.action-btn.mark-paid {
    @apply text-green-600 hover:text-green-900;
}

.action-btn.view {
    @apply text-gray-600 hover:text-gray-900;
}

/* Seções de navegação */
.admin-nav {
    @apply flex space-x-3 mb-6;
}

.admin-nav button {
    @apply px-4 py-2 rounded-lg font-medium transition-colors;
}

.admin-nav button.active {
    @apply bg-blue-600 text-white;
}

.admin-nav button:not(.active) {
    @apply bg-gray-200 text-gray-700 hover:bg-gray-300;
}

/* Formulários administrativos */
.admin-form {
    @apply space-y-6;
}

.form-group {
    @apply space-y-2;
}

.form-label {
    @apply block text-sm font-medium text-gray-700;
}

.form-input {
    @apply w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500;
}

.form-select {
    @apply w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500;
}

.form-textarea {
    @apply w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500;
}

/* Modais administrativos */
.admin-modal {
    @apply fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full z-50;
}

.modal-content {
    @apply relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white;
}

.modal-header {
    @apply flex items-center justify-between mb-4;
}

.modal-title {
    @apply text-lg font-medium text-gray-900;
}

.modal-close {
    @apply text-gray-400 hover:text-gray-600 cursor-pointer;
}

.modal-body {
    @apply space-y-4;
}

.modal-footer {
    @apply flex justify-end space-x-3 mt-6;
}

/* Alertas e notificações */
.admin-alert {
    @apply p-4 rounded-md mb-4;
}

.admin-alert.success {
    @apply bg-green-50 text-green-800 border border-green-200;
}

.admin-alert.error {
    @apply bg-red-50 text-red-800 border border-red-200;
}

.admin-alert.warning {
    @apply bg-yellow-50 text-yellow-800 border border-yellow-200;
}

.admin-alert.info {
    @apply bg-blue-50 text-blue-800 border border-blue-200;
}

/* Paginação */
.pagination {
    @apply flex items-center justify-between px-6 py-3 bg-white border-t border-gray-200;
}

.pagination-info {
    @apply text-sm text-gray-700;
}

.pagination-controls {
    @apply flex space-x-2;
}

.pagination-btn {
    @apply px-3 py-1 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-md hover:bg-gray-50;
}

.pagination-btn.active {
    @apply bg-blue-600 text-white border-blue-600;
}

.pagination-btn:disabled {
    @apply opacity-50 cursor-not-allowed;
}

/* Filtros e busca */
.admin-filters {
    @apply bg-white rounded-lg shadow p-4 mb-6;
}

.filter-row {
    @apply grid grid-cols-1 md:grid-cols-3 gap-4;
}

.filter-group {
    @apply space-y-2;
}

.filter-label {
    @apply block text-sm font-medium text-gray-700;
}

.filter-input {
    @apply w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500;
}

.filter-actions {
    @apply flex items-end space-x-3;
}

/* Responsividade */
@media (max-width: 768px) {
    .admin-nav {
        @apply flex-col space-y-2;
    }
    
    .filter-row {
        @apply grid-cols-1;
    }
    
    .admin-table {
        @apply text-xs;
    }
    
    .admin-table th,
    .admin-table td {
        @apply px-3 py-2;
    }
    
    .stat-card {
        @apply p-4;
    }
    
    .stat-value {
        @apply text-xl;
    }
}

@media (max-width: 640px) {
    .admin-table {
        @apply text-xs;
    }
    
    .admin-table th,
    .admin-table td {
        @apply px-2 py-1;
    }
    
    .action-btn {
        @apply block mb-1;
    }
}

/* Animações */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Estados de loading */
.loading {
    @apply opacity-50 pointer-events-none;
}

.loading::after {
    content: '';
    @apply absolute inset-0 bg-gray-200 bg-opacity-50 flex items-center justify-center;
}

.loading::after::before {
    content: 'Carregando...';
    @apply text-gray-600 font-medium;
}

/* Tooltips */
.tooltip {
    @apply relative inline-block;
}

.tooltip::after {
    content: attr(data-tooltip);
    @apply absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-3 py-1 text-sm text-white bg-gray-900 rounded-md opacity-0 pointer-events-none transition-opacity duration-200 whitespace-nowrap;
}

.tooltip:hover::after {
    @apply opacity-100;
}

/* Scrollbars personalizados */
.admin-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.admin-scrollbar::-webkit-scrollbar-track {
    @apply bg-gray-100 rounded-full;
}

.admin-scrollbar::-webkit-scrollbar-thumb {
    @apply bg-gray-400 rounded-full;
}

.admin-scrollbar::-webkit-scrollbar-thumb:hover {
    @apply bg-gray-500;
}

/* Estados de hover e focus */
.hover\:shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.focus\:ring-2:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.focus\:border-blue-500:focus {
    border-color: #3b82f6;
}

/* Utilitários */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cursor-pointer {
    cursor: pointer;
}

.select-none {
    user-select: none;
}

.transition-all {
    transition: all 0.2s ease-in-out;
}

.transition-colors {
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.transition-transform {
    transition: transform 0.2s ease-in-out;
}
