/* ===== RECEITAS CSS ===== */

/* Container principal */
.receitas-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Cabeçalho */
.receitas-header {
    margin-bottom: 2rem;
}

.receitas-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.receitas-subtitle {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Botões de ação */
.receitas-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-primary svg {
    width: 1.25rem;
    height: 1.25rem;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Card de filtros */
.receitas-filters {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.filter-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    min-width: 180px;
    transition: all 0.2s ease;
}

.filter-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-filter {
    padding: 0.5rem 1.25rem;
    background: #374151;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-filter:hover {
    background: #1f2937;
}

.btn-clear {
    padding: 0.5rem 1.25rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-clear:hover {
    background: #dc2626;
}

.filters-summary {
    margin-top: 0.75rem;
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.filters-summary strong {
    color: #111827;
}

/* Tabela */
.receitas-table-card {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.receitas-table {
    width: 100%;
    border-collapse: collapse;
}

.receitas-table thead {
    background: #f9fafb;
}

.receitas-table th {
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

.receitas-table th.text-right {
    text-align: right;
}

.receitas-table th.text-center {
    text-align: center;
}

.receitas-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.15s ease;
}

.receitas-table tbody tr:hover {
    background: #f9fafb;
}

.receitas-table td {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    color: #111827;
}

.receitas-table td.text-right {
    text-align: right;
}

.receitas-table td.text-center {
    text-align: center;
}

.valor-positivo {
    color: #059669;
    font-weight: 600;
}

.categoria-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #d1fae5;
    color: #065f46;
}

/* Empty state */
.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: #9ca3af;
}

.empty-state svg {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.5rem;
}

/* Vínculos */
.vinculos-section {
    margin-top: 2rem;
}

.vinculos-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.vinculos-list {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.vinculo-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.15s ease;
}

.vinculo-item:last-child {
    border-bottom: none;
}

.vinculo-item:hover {
    background: #f9fafb;
}

.vinculo-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vinculo-info {
    flex: 1;
}

.vinculo-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.vinculo-details {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.vinculo-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.vinculo-badge.ativo {
    background: #d1fae5;
    color: #065f46;
}

.vinculo-badge.inativo {
    background: #f3f4f6;
    color: #6b7280;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 32rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.form-input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-hint {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.btn-modal-primary {
    padding: 0.5rem 1rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-modal-primary:hover {
    background: #059669;
}

.btn-modal-secondary {
    padding: 0.5rem 1rem;
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-modal-secondary:hover {
    background: #f9fafb;
}

/* Responsive */
@media (max-width: 768px) {
    .receitas-title {
        font-size: 1.5rem;
    }
    
    .receitas-table th,
    .receitas-table td {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }
    
    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-input {
        width: 100%;
    }
}

