/* Recolecciones Page Styles */

/* Filters Section */
.filters-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.filter-label svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.filter-select {
    flex: 1;
    max-width: 400px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:hover {
    border-color: var(--primary-color);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Pickups Section */
.pickups-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.pickup-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.pickup-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.pickup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.pickup-id-badge {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pickup-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-download:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-download svg {
    width: 16px;
    height: 16px;
}

.btn-download.csv {
    border-color: #27ae60;
    color: #27ae60;
}

.btn-download.csv:hover {
    background: #27ae60;
    color: white;
}

.btn-download.pdf {
    border-color: #e74c3c;
    color: #e74c3c;
}

.btn-download.pdf:hover {
    background: #e74c3c;
    color: white;
}

.pickup-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Phases List Simple */
.phases-list-simple {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.phases-list-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.phase-simple-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    font-size: 0.875rem;
    color: var(--text-primary);
    border-bottom: 1px solid #f0f0f0;
}

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

.phase-index {
    color: var(--text-secondary);
    font-weight: 600;
    min-width: 24px;
    flex-shrink: 0;
}

.phase-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.phase-line {
    line-height: 1.5;
}

.product-name-small {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.8;
}

.phases-empty {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-style: italic;
}

.phases-preview {
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
}

.phases-preview-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.phases-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.phase-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: var(--background);
    border-radius: 4px;
    font-size: 0.875rem;
}

.phase-number {
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.phase-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.phase-order-id {
    font-weight: 600;
    color: var(--text-primary);
}

.phase-patient {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Pagination */
.pagination-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    flex-wrap: wrap;
    gap: 16px;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn svg {
    width: 16px;
    height: 16px;
}

.pagination-current {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    color: var(--text-secondary);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Loading Container */
.loading-container {
    text-align: center;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-container .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-section {
        grid-template-columns: 1fr;
    }
    
    .filters-section {
        padding: 16px;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select {
        max-width: 100%;
    }
    
    .pickup-header {
        flex-direction: column;
        align-items: stretch;
    }

    .pickup-actions {
        width: 100%;
        justify-content: stretch;
    }

    .btn-download {
        flex: 1;
        justify-content: center;
    }

    .pickup-info {
        grid-template-columns: 1fr;
    }

    .pagination-section {
        flex-direction: column;
        text-align: center;
    }

    .pagination-controls {
        flex-direction: column;
        width: 100%;
    }

    .pagination-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .pickups-section {
        padding: 16px;
    }
    
    .pickup-card {
        padding: 16px;
    }
}

